package com.artwork.service.impl;

import com.artwork.mapper.OrderMapper;
import com.artwork.model.Order;
import com.artwork.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author JoJo
 * @Data 2021/9/9$ 15:00$
 * @Description
 * @Param $
 * @Return $
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    OrderMapper orderMapper;

    @Override
    public Order getOrderById(int id) {
        return orderMapper.selectByPrimaryKey(id);
    }

    @Override
    public int pushOrder(int id, int status) {
        return orderMapper.pushOrder(id, status);
    }

    @Override
    public int deleteOrder(int id) {
        return orderMapper.deleteOrder(id);
    }

    @Override
    public List<Order> getList() {
        return orderMapper.getList();
    }
}
